package com.longxiao.enums;

public enum ClassroomStatus {

	WAITING((byte)0,"等待匹配"),
	MATCH_SUCC((byte)1,"匹配成功"),
	CANCEL((byte)2,"取消"),
	EXCEPTION((byte)3,"授课状态异常"),
	FINISH((byte)5,"完成"),
	;
	
	private byte status;
	
	private String desc;

	private ClassroomStatus(byte status, String desc) {
		this.status = status;
		this.desc = desc;
	}

	public byte getStatus() {
		return status;
	}

	public String getDesc() {
		return desc;
	}
	
	public static ClassroomStatus getStatus(byte s) {
		ClassroomStatus[] statusArr = values();
		for(ClassroomStatus status : statusArr) {
			if(status.getStatus() == s) {
				return status;
			}
		}
		return null;
	}
	
}
